<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>  
<%@ page import="java.sql.*"%>  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <link type = "text/css" rel = "stylesheet" href = "css/header.css">
   <link type = "text/css" rel = "stylesheet" href = "css/index.css">
   <link type = "text/css" rel = "stylesheet" href = "css/reset.css">
   <script type="text/javascript" src="js/index.js"></script>
<title>兼职之家首页</title>
</head>
<body>
  <!--数据库连接 -->
  <%--  <%!  
    public static final String DRIVER = "com.mysql.jdbc.Driver";  
    public static final String USER = "root";  
    public static final String PASS = "mysql";  
    public static final String URL = "jdbc:mysql://localhost:3306/parttime";  
    public static final int PAGESIZE = 20; //一页显示20条结果 
    int pageCount;  
    int curPage = 1;  
    %>   --%>
     <!-- 页面首条 -->
    <header class="header">
	    <nav class="w_main navigation_box">
		   <div class="channel_box">
			  <a rel="nofollow" href="">首页</a>
			  <a rel = "nofollow" href = "">个人中心</a>
			  | 
              <a rel="nofollow" href="" class="selected">登录</a>
		   </div>
	    </nav>
     </header>

      <!--兼职搜索框 -->
      <div class="logo_box clearfix">
		<a  href="/" class="logo left">
		    <img src="images/logo.png" alt="兼职之家logo">
		</a>
		<div class="search_wrap left">
				<input type="text" class="search" id="search" value="请输入搜索的内容" onfocus="javascript:if(this.value=='请输入搜索的内容')this.value='';">
			    <input type="button"  value="搜索" class="submit" id="submit">	
			    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
			    <a class = "public" href = "ReleaseOfPartTime.html">发布兼职</a>
		</div>
      </div>
      <div style = "height: 40px"></div>
      
     <!--兼职类型板块 -->
      <div class="option_box">
				<div class="tabs clearfix">
					<a>最新兼职</a>
				</div>
				<div class="cnts">
					<ul class="box">
						<li><span>类&nbsp;&nbsp;型:</span> 
						         <a href="" rel="nofollow" class="selected">不限</a> 
						         <a href="" class="tab">短期兼职</a> 
						         <a href="" class="tab">长期兼职</a> 
						         <a href="" class="tab">周末兼职</a>
							     <a href="" class="tab">全职招聘</a>	
						</li>
					</ul>
				</div>
	   </div>
				
	   <div class="content_box clearfix">
				<div class="content_list_box">
					<ul class="content_list_wrap" id="content_list_wrap">
					
				<%-- 	<%  
					    //一页放20个  
					    String user = null;  
					    String pass = null;  
					    try{  
					        Class.forName(DRIVER);  
					        Connection con = DriverManager.getConnection(URL,USER,PASS);  
					        String sql = "SELECT workplace,wages,add_time FROM part_time_job";  
					        PreparedStatement stat = con.prepareStatement(sql,ResultSet.TYPE_FORWARD_ONLY,ResultSet.CONCUR_READ_ONLY);  
					        ResultSet rs = stat.executeQuery();  
					        rs.last();  
					        int size = rs.getRow();  
					        pageCount = (size%PAGESIZE==0)?(size/PAGESIZE):(size/PAGESIZE+1);  
					        String tmp = request.getParameter("curPage");  
					        if(tmp==null){  
					            tmp="1";  
					        }  
					        curPage = Integer.parseInt(tmp);  
					        if(curPage>=pageCount) curPage = pageCount;  
					        boolean flag = rs.absolute((curPage-1)*PAGESIZE+1);  
					        out.println(curPage);  
					        int count = 0; 
					        
					        do{  
					            if(count>=PAGESIZE)break;  
					           
					            String job = rs.getString(1);
					            String workplace = rs.getString(2);
					            int wages = rs.getInt(3);
					            Date add_time = rs.getDate(4);
					            
					            count++;  
					  %>  
          
							<li>
									<div class="left type_wrap">
										<i class="type qt"></i>
									</div> 
									<a  href="job_description.html" target="_blank" title="<%=job %>" class="left title hot">
									    <%=job%>
									</a>
									<div class="left area">
										<span title="<%=workplace%>">
										   &nbsp;<%=workplace%>
										</span>
									</div> 
									<div class="left visited">
										<span title="<%=wages%>">
										   &nbsp;<%=wages %>
										</span>
									</div> 
									<div class="left date" title="<%=add_time%>">
										  &nbsp;<%=add_time %>
								    </div>
						    </li>
						    
						     <%  
							        }while(rs.next());  
							        con.close();  
							    }  
							    catch(Exception e){  
							          
							    }  
							%>  
							 --%>
							<li>
									<div class="left type_wrap">
										<i class="type qt"></i>
									</div> 
									<a  href="job_description.html" target="_blank" title="" class="left title hot">
									    高薪苹果手机APP试玩
									</a>
									<div class="left area">
										<span title="">
										   &nbsp;天河
										</span>
									</div> 
									<div class="left visited">
										<span title="">
										   &nbsp;2人
										</span>
									</div> 
									<div class="left date" title="">
										  &nbsp;刚刚
								    </div>
						    </li>
						   
						    <li>
									<div class="left type_wrap">
										<i class="type qt"></i>
									</div> 
									<a  href="job_description.html" target="_blank" title="" class="left title hot">
									   岗顶五谷渔粉兼职
									</a>
									<div class="left area">
										<span title="">
										   &nbsp;天河
										</span>
									</div> 
									<div class="left visited">
										<span title="">
										   &nbsp;10人
										</span>
									</div> 
									<div class="left date" title="">
										  &nbsp;刚刚
								    </div>
						    </li>
						    
						     <li>
									<div class="left type_wrap">
										<i class="type qt"></i>
									</div> 
									<a  href="job_description.html" target="_blank" title="" class="left title hot">
									   时薪20至30元的华师附
									</a>
									<div class="left area">
										<span title="">
										   &nbsp;天河
										</span>
									</div> 
									<div class="left visited">
										<span title="">
										   &nbsp;10人
										</span>
									</div> 
									<div class="left date" title="">
										  &nbsp;5分钟前
								    </div>
						    </li>
						    
						     <li>
									<div class="left type_wrap">
										<i class="type qt"></i>
									</div> 
									<a  href="job_description.html" target="_blank" title="" class="left title hot">
									   小逗君APP校园大使
									</a>
									<div class="left area">
										<span title="">
										   &nbsp;番禺
										</span>
									</div> 
									<div class="left visited">
										<span title="">
										   &nbsp;若干
										</span>
									</div> 
									<div class="left date" title="">
										  &nbsp;20分钟前
								    </div>
						    </li>
						    
						     <li>
									<div class="left type_wrap">
										<i class="type qt"></i>
									</div> 
									<a  href="job_description.html" target="_blank" title="" class="left title hot">
									   招聘招生接待老师
									</a>
									<div class="left area">
										<span title="">
										   &nbsp;萝岗
										</span>
									</div> 
									<div class="left visited">
										<span title="">
										   &nbsp;5人
										</span>
									</div> 
									<div class="left date" title="">
										  &nbsp;21分钟前
								    </div>
						    </li>
						    
						     <li>
									<div class="left type_wrap">
										<i class="type qt"></i>
									</div> 
									<a  href="job_description.html" target="_blank" title="" class="left title hot">
									   招中大南方院推广大使
									</a>
									<div class="left area">
										<span title="">
										   &nbsp;从化
										</span>
									</div> 
									<div class="left visited">
										<span title="">
										   &nbsp;若干
										</span>
									</div> 
									<div class="left date" title="">
										  &nbsp;25分钟前
								    </div>
						    </li>
						    
						     <li>
									<div class="left type_wrap">
										<i class="type qt"></i>
									</div> 
									<a  href="job_description.html" target="_blank" title="" class="left title hot">
									  资料录入员
									</a>
									<div class="left area">
										<span title="">
										   &nbsp;白云
										</span>
									</div> 
									<div class="left visited">
										<span title="">
										   &nbsp;2人
										</span>
									</div> 
									<div class="left date" title="">
										  &nbsp;25分钟前
								    </div>
						    </li>
						    
						     <li>
									<div class="left type_wrap">
										<i class="type qt"></i>
									</div> 
									<a  href="job_description.html" target="_blank" title="" class="left title hot">
									  10086客服纯接听
									</a>
									<div class="left area">
										<span title="">
										   &nbsp;海珠
										</span>
									</div> 
									<div class="left visited">
										<span title="">
										   &nbsp;8人
										</span>
									</div> 
									<div class="left date" title="">
										  &nbsp;1小时前
								    </div>
						    </li>
						    
						     <li>
									<div class="left type_wrap">
										<i class="type qt"></i>
									</div> 
									<a  href="job_description.html" target="_blank" title="" class="left title hot">
									   苏宁易购招募校园先锋
									</a>
									<div class="left area">
										<span title="">
										   &nbsp;天河
										</span>
									</div> 
									<div class="left visited">
										<span title="">
										   &nbsp;若干
										</span>
									</div> 
									<div class="left date" title="">
										  &nbsp;一天前
								    </div>
						    </li>
				      </ul>
				</div>
				
				<!--分页选项栏 -->
			     <div class = "content_page_box">
			         <ul class = "content_page_wrap">
			             <li><a href = "index.jsp?curPage=1" >首页</a> </li>
			             <li><a href = "index.jsp?curPage=<%-- <%=curPage-1%> --%>" >上一页</a></li>
			             <li><a href = "index.jsp?curPage=<%-- <%=curPage+1%> --%>" >下一页</a></li>
			             <li><a href = "index.jsp?curPage=<%-- <%=pageCount%> --%>" >尾页</a>  </li>
			             <li style = "padding: 5px 10px;">第1页/共1页 </li>
			         </ul>
				 </div>
	    </div>
	   
</body>
</html>
